# Contributor: John Regan <john@jrjrtech.com>
# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
pkgname=s6-portable-utils
pkgver=2.3.0.3
pkgrel=1
pkgdesc="skarnet.org's tiny portable generic utilities"
url=https://skarnet.org/software/s6-portable-utils/
arch="all"
license="ISC"
makedepends="skalibs-dev>=2.14"
options="!check"
subpackages="$pkgname-doc"
source="https://skarnet.org/software/s6-portable-utils/s6-portable-utils-$pkgver.tar.gz"

build() {
	./configure \
		--enable-shared \
		--enable-static \
		--disable-allstatic \
		--prefix=/usr \
		--libdir=/usr/lib \
		--enable-multicall
	make
}

package() {
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/include/s6-portable-utils/config.h
	rmdir -p "$pkgdir"/usr/include/s6-portable-utils || :
}

doc() {
	default_doc
	mkdir -p "$subpkgdir/usr/share/doc"
	cp -a "$builddir/doc" "$subpkgdir/usr/share/doc/$pkgname"
}

sha512sums="
f75242ac6c06ffd5bd66b8a35bbdf39938cf3bfa6e79abd214af37e9e4acc732ca1760566862482bc964a5cca05bbce8bd24d7167b02dc66c5f397c85ee0d37f  s6-portable-utils-2.3.0.3.tar.gz
"
